home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / IC TextEdit Patch ƒ / ICeTEe.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-03  |  2.2 KB  |  99 lines  |  [TEXT/SPM ]

  1. /*
  2.     ICeTEe.h
  3.     
  4.     Header file for ICeTEe.c
  5.     
  6. */
  7.  
  8. #pragma once
  9.  
  10. #ifndef __H_ICeTEe__
  11. #define __H_ICeTEe__
  12.  
  13. #include <TextEdit.h>
  14. #include <Files.h>
  15.  
  16. // Component Creator Type
  17. #define kCreator 'ICTE'
  18.  
  19. // EXCL - App Creator Types that don't use the patch
  20. #define rExclusions  128
  21.  
  22. // ICN# - Icon to use for startup display
  23. #define rICTEIcon  128
  24. #define rFailedIcon  129
  25.  
  26. // STR# - Error messages used for the notification routine
  27. #define rErrorStrings  128
  28. #define strMiscErr  1
  29. #define strNoCMErr  2
  30. #define strNoICErr  3
  31. #define strInsufficientICErr  4
  32. #define strNoMemoryErr  5
  33. #define strCantFindHelperErr  6
  34. #define strNoHelperErr  7
  35. #define strNoURLErr  8
  36. #define strCantHackIt  9
  37.  
  38. #define noCMErr  -6660
  39.  
  40. // TEClickUPP - UPP used to create a correct Universal Proc Ptr for the PPC version.
  41. typedef pascal void (*TEClickProcPtr)(Point pt,Boolean fExtend,TEHandle teh);
  42.  
  43. enum {
  44.     uppTEClickProcInfo=kPascalStackBased
  45.         | STACK_ROUTINE_PARAMETER(1,SIZE_CODE(sizeof(Point)))
  46.         | STACK_ROUTINE_PARAMETER(2,SIZE_CODE(sizeof(Boolean)))
  47.         | STACK_ROUTINE_PARAMETER(3,SIZE_CODE(sizeof(TEHandle)))
  48. };
  49.  
  50. #if USESROUTINEDESCRIPTORS
  51. typedef UniversalProcPtr TEClickUPP;
  52.  
  53. #define CallTEClickProc(a,p,e,t) \
  54.     CallUniversalProc((UniversalProcPtr)(a),uppTEClickProcInfo,(p),(e),(t))
  55. #define NewTEClickProc(a) \
  56.     (TEClickUPP)NewRoutineDescriptor((ProcPtr)(a),uppTEClickProcInfo,GetCurrentISA())
  57.  
  58. #else
  59. typedef TEClickProcPtr TEClickUPP;
  60.  
  61. #define CallTEClickProc(a,p,e,t) (*(a))(p,e,t)
  62. #define NewTEClickProc(a) (TEClickUPP)(a)
  63.  
  64. #endif
  65.  
  66. #define DisposeTEClickProc(a) DisposeRoutineDescriptor((UniversalProcPtr)(a))
  67.  
  68. // Globals for the patch
  69. typedef struct icteGlobalsStruct icteGlobals,* icteGlobalsPtr,** icteGlobalsPtrPtr;
  70. typedef OSType *exPtr,** exHandle;
  71.  
  72. #if defined(powerc) || defined (__powerc)
  73. #pragma options align=mac68k
  74. #endif
  75. struct icteGlobalsStruct {
  76.     OSType signature;        // 
  77.     NumVersion version;        // 
  78.     exHandle exclusions;        // Array of OSTypes for apps to exclude
  79.     Handle errors;        // STR# resource handle
  80.     TEClickUPP old_teclick;    // patched TEClick proc
  81. };
  82. #if defined(powerc) || defined(__powerc)
  83. #pragma options align=reset
  84. #endif
  85.  
  86. #ifdef __cplusplus
  87. extern "C" {
  88. #endif
  89.  
  90. void main(void);
  91.  
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95.  
  96. #endif /* __H_ICeTEe__ */
  97.  
  98.  
  99.